package com.learn.swagger;

import com.learn.swagger.config.Swagger2Config;
import com.learn.swagger.config.WebConfig;
import com.learn.swagger.controller.HelloController;
import com.learn.swagger.result.Result;
import com.learn.swagger.vo.Base;
import com.learn.swagger.vo.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Swagger项目启动类
 * <p>
 * 1、其中@EnableSwagger2 开启swagger
 * 2、Swagger配置见{@link Swagger2Config}
 * 3、Swagger静态资源路由见{@link WebConfig#addResourceHandlers(ResourceHandlerRegistry)}
 * 4、参数示例见{@link User}{@link Base}{@link Result} @ApiModel @ApiModelProperty
 * 5、接口示例见{@link HelloController} @Api @ApiOperation @ApiImplicitParam @ApiParam
 *
 * @author zhousiqi
 * @version 1.0.0
 * @date 2019/2/26 11:17
 */
@SpringBootApplication
@EnableSwagger2
public class SwaggerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SwaggerApplication.class, args);
    }
}
